#include "OnDieState.h"
#include "RSManager.h"
#include "GameDefine.h"
#include "Player.h"
#define CONTRA_VX 2.5f

OnDieState::OnDieState(Player* player)
{
	p = player;
	_left = RSManager::getInstance()->getSprite(PLAYER_DIE_LEFT);
	_right = RSManager::getInstance()->getSprite(PLAYER_DIE_RIGHT);
	p->setSprite(_right);	
}


OnDieState::~OnDieState(void)
{
}

PLAYER_STATE OnDieState::handleInput(float time)
{			
	if(gDirection == LEFT)
	{
		p->setSprite(_left);
		p->set_vx(CONTRA_VX);			
	}
	else
	{
		p->setSprite(_right);
		p->set_vx(-CONTRA_VX);			
	}	
	return ONDIE;
}
